package cn.cleanarch.infra.idp.pms.constants;

/**
 * API路径常量定义
 */
public final class ApiPathConstants {

    private ApiPathConstants() {
        // 防止实例化
    }

    // 基础路径
    public static final String BASE_PATH = "/pms";
    public static final String DESIGN_FILE_PATH = BASE_PATH + "/design-file";

    // 预览相关路径
    public static final String SECURE_PREVIEW_FILE = "/secure-preview/file/{fileId}/preview";
    public static final String SECURE_PREVIEW_FILE_PATTERN = SECURE_PREVIEW_FILE + "/**";
    public static final String SECURE_PREVIEW_FILE_SHARE_URL = SECURE_PREVIEW_FILE + "/index.html?t={timeStamp}";

    // 版本预览相关路径
    public static final String SECURE_PREVIEW_VERSION = "/secure-preview/version/{versionId}/preview";
    public static final String SECURE_PREVIEW_VERSION_PATTERN = SECURE_PREVIEW_VERSION + "/**";
    public static final String SECURE_PREVIEW_VERSION_SHARE_URL = SECURE_PREVIEW_VERSION + "/index.html?t={timeStamp}";

    // 内部路径（Spring Security使用）
    public static final String API_AUTH_LOGIN = "/auth/login";
    public static final String API_AUTH_CAPTCHA = "/auth/captcha";

    // 错误消息
    public static final String ERROR_FILE_NOT_FOUND = "文件不存在";
    public static final String ERROR_FILE_TYPE_NOT_SUPPORTED = "文件类型不支持预览";
    public static final String ERROR_FILE_PROCESSING = "文件正在处理中，请稍后重试";
    public static final String ERROR_INDEX_FILE_NOT_FOUND = "索引文件不存在";
    public static final String ERROR_FILE_UPLOAD_FAILED = "文件上传失败";
    public static final String ERROR_FILE_EMPTY = "文件不能为空";
    public static final String ERROR_FILE_LIST_EMPTY = "文件列表不能为空";
    public static final String ERROR_TAG_NOT_FOUND = "标签不存在";
    public static final String ERROR_BATCH_UPLOAD_FAILED = "批量文件上传失败";

    // 响应消息
    public static final String MSG_UPLOAD_SUCCESS = "文件上传成功";
    public static final String MSG_DELETE_SUCCESS = "文件删除成功";
    public static final String MSG_TAG_CREATE_SUCCESS = "标签创建成功";
    public static final String MSG_TAG_UPDATE_SUCCESS = "标签更新成功";
    public static final String MSG_TAG_DELETE_SUCCESS = "标签删除成功";
    public static final String MSG_SCAN_SUCCESS = "安全扫描完成";

    // 预览配置
    public static final String PREVIEW_BASE_URL = "http://localhost:8085";
    public static final String PREVIEW_HTML_PATH = "/html";
    public static final String PREVIEW_IMAGE_PATH = "/uploads/design-files/";
    public static final String PREVIEW_DOCUMENT_PATH = "/document";
    public static final String PREVIEW_DOWNLOAD_PATH = "/download";
}